package com.kingint.mbg.ser.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kingint.mbg.dto.BackQueryParam;
import com.kingint.mbg.ser.entity.SerSendMessage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 群发通知表 Mapper 接口
 * </p>
 *
 * @author wxh
 * @since 2020-12-25
 */
public interface SerSendMessageMapper extends BaseMapper<SerSendMessage> {

    /**
     * 根据回复状态用户id查询用户的群发通知信息
     * @param userId
     * @param reply
     * @return
     */
    List<SerSendMessage> getMessageListByUserId(@Param("userId") Long userId, @Param("reply") Integer reply);


    /**
     * 分页查询群发通知列表信息（后台使用）
     * @param page
     * @param queryParam
     * @return
     */
    IPage<SerSendMessage> getSendMessageList(IPage<SerSendMessage> page,@Param("query") BackQueryParam queryParam);

    /**
     * 前端分页查询群发通知信息
     * @param page
     * @param queryParam
     * @return
     */
    IPage<SerSendMessage> getFrontSendMessageList(IPage<SerSendMessage> page,@Param("query") BackQueryParam queryParam);
}
